package datasource

import org.apache.flink.streaming.api.scala.{DataStream, StreamExecutionEnvironment}

object SocketStream {
  /**
    * 监听socket端口获取数据源
    * @param host
    * @param port
    * @param env
    * @return
    */
  def getSocketStream(host: String, port: Int, env: StreamExecutionEnvironment): DataStream[String] =
    env.socketTextStream(host, port)

}
